//
//  CRInputView.h
//  TestPrj
//
//  Created by 朱铅峰 on 2020/8/3.
//  Copyright © 2020 Xing. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CRInputToolBar.h"
#import "CRHeader.h"
#import "CRSessionConfig.h"
#import "CRInputActionDelegate.h"
#import "CRInputAudioRecordIndicatorView.h"

@protocol CRInputViewDelegate <NSObject>

@optional

- (void)didChangeInputHeight:(CGFloat)inputHeight;

@end

@interface CRInputView : UIView

@property (nonatomic, weak) id<CRSessionConfig> inputConfig;//会话配置代理
@property (nonatomic, weak) id<CRInputActionDelegate> actionDelegate;//行为代理

@property (strong, nonatomic) CRInputToolBar *toolBar;//输入栏
@property (strong, nonatomic) UIView *moreContainer;//更多面板
@property (strong, nonatomic) UIView *emoticonContainer;//表情面板
//
@property (nonatomic, assign) CRInputStatus status; //输入状态
@property (nonatomic, weak) id<CRInputViewDelegate> inputDelegate;//输入面板代理（目前只有高度变化）

@property (nonatomic, assign) NSInteger              maxTextLength;//最大文本行数

@property (assign, nonatomic, getter=isRecording) BOOL recording;//是否录音中
@property (nonatomic, assign) CRAudioRecordPhase recordPhase;//录音状态
//
@property (nonatomic, strong) CRInputAudioRecordIndicatorView *audioRecordIndicator;//录音遮罩视图

- (instancetype)initWithFrame:(CGRect)frame
                       config:(id<CRSessionConfig>)config;

/// 重置
- (void)reset;

/// 刷新输入状态
/// @param status 状态
- (void)refreshStatus:(CRInputStatus)status;

/// 设置文本框提示语
/// @param placeHolder <#placeHolder description#>
- (void)setInputTextPlaceHolder:(NSString*)placeHolder;

@end
